package com.xhs.main.service.cwb.impl;

import com.xhs.main.dao.cwb.CwbBankManagerDao;
import com.xhs.main.entity.cwb.CwbBankManage;
import com.xhs.main.service.cwb.CwbBankManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CwbBankManagerServiceImpl implements CwbBankManagerService {

    @Autowired
    CwbBankManagerDao cwbBankManagerDao;


    @Override
    public void addCwbBankManage() {
        cwbBankManagerDao.insertCwbBankManage(
                new CwbBankManage(1,"6666666666",1002,
                        "中国银行", "海昌路支行","人名币"));
    }

    @Override
    public List<CwbBankManage> getAllCwbBankManage() {
        List<CwbBankManage> bankManages = cwbBankManagerDao.selectAllCwbBankManage();
        return bankManages;
    }

    @Override
    public CwbBankManage getOneByID(Integer cwbBId) {
        CwbBankManage cwbBankManage = cwbBankManagerDao.selectOneByID(cwbBId);
        return cwbBankManage;
    }
}
